package xinxin.com.BuilderPatternBasic.Builder.ConcreteBuilder;

import xinxin.com.BuilderPatternBasic.Builder.Builder;
import xinxin.com.BuilderPatternBasic.Product.Product;

/**
 * @author ：史鑫鑫
 * @date ：Created in 2019/3/25 20:14
 */
public class ConcreteBuilder2 extends Builder {
    private Product product;

    public ConcreteBuilder2() {
        this.product = new Product();
    }

    @Override
    public void BuildePartA() {
        product.Add("部件X");
    }

    @Override
    public void BuildePartB() {
        product.Add("部件Y");
    }

    @Override
    public Product GetResult() {
        return product;
    }
}
